package pear.gui;

import java.awt.CardLayout;
import javax.swing.JPanel;

/**
 *
 * @author Dingo
 */
public class NaviLogic {

    private JPanel root;
    private CardLayout cl;

    public NaviLogic(JPanel rootPanel) {
        root = rootPanel;
        root.add(new DownloadPanel(), "downloadPanel");
        root.add(new UploadPanel(), "uploadPanel");
        root.add(new UploadPanelWizzard(), "uploadWizzard");
        root.add(new OptionsPanel(), "optionsPanel");
        cl = (CardLayout) (root.getLayout());
    }
    
    public void showPanel(String panel){
        cl.show(root, panel);
    }
}
